import { IsNotEmpty, Length, IsString } from 'class-validator'

export class CreateAuthDto {
  @IsNotEmpty()
  email: string
  @IsNotEmpty({ message: '用户名不能为空' })
  @IsString({ message: '用户名必须为字符串' })
  @Length(3, 10, { message: '用户名长度为3-10位' })
  name: string
  @IsNotEmpty({ message: '密码不能为空' })
  @IsString({ message: '密码必须为字符串' })
  @Length(6, 16, { message: '密码长度为6-16位' })
  password: string
}
